pub mod arith;
pub mod binary;
pub mod boolean;
pub mod comparison;
pub mod datetime;
pub mod debug;
pub mod is;
pub mod list;
pub mod negate;
pub mod numeric;
pub mod random;
pub mod similarity;
pub mod string;
pub mod struct_funcs;

mod not_implemented;

use arith::{
    FUNCTION_SET_ADD,
    FUNCTION_SET_DIV,
    FUNCTION_SET_MUL,
    FUNCTION_SET_REM,
    FUNCTION_SET_SUB,
};
use binary::{FUNCTION_SET_SHL, FUNCTION_SET_SHR, FUNCTION_SET_XOR};
use boolean::{FUNCTION_SET_AND, FUNCTION_SET_OR};
use comparison::{
    FUNCTION_SET_EQ,
    FUNCTION_SET_GT,
    FUNCTION_SET_GT_EQ,
    FUNCTION_SET_IS_DISTINCT_FROM,
    FUNCTION_SET_IS_NOT_DISTINCT_FROM,
    FUNCTION_SET_LT,
    FUNCTION_SET_LT_EQ,
    FUNCTION_SET_NEQ,
};
use datetime::{
    FUNCTION_SET_DATE_PART,
    FUNCTION_SET_DATE_TRUNC,
    FUNCTION_SET_EPOCH,
    FUNCTION_SET_EPOCH_MS,
};
use debug::FUNCTION_SET_DEBUG_ERROR_ON_EXECUTE;
use is::{
    FUNCTION_SET_IS_FALSE,
    FUNCTION_SET_IS_NOT_FALSE,
    FUNCTION_SET_IS_NOT_NULL,
    FUNCTION_SET_IS_NOT_TRUE,
    FUNCTION_SET_IS_NULL,
    FUNCTION_SET_IS_TRUE,
};
use list::{FUNCTION_SET_LIST_EXTRACT, FUNCTION_SET_LIST_VALUE};
use negate::{FUNCTION_SET_NEGATE, FUNCTION_SET_NOT};
use numeric::{
    FUNCTION_SET_ABS,
    FUNCTION_SET_ACOS,
    FUNCTION_SET_ACOSH,
    FUNCTION_SET_ASIN,
    FUNCTION_SET_ASINH,
    FUNCTION_SET_ATAN,
    FUNCTION_SET_ATAN2,
    FUNCTION_SET_ATANH,
    FUNCTION_SET_CBRT,
    FUNCTION_SET_CEIL,
    FUNCTION_SET_COS,
    FUNCTION_SET_COSH,
    FUNCTION_SET_COT,
    FUNCTION_SET_DEGREES,
    FUNCTION_SET_EXP,
    FUNCTION_SET_FACTORIAL,
    FUNCTION_SET_FLOOR,
    FUNCTION_SET_GCD,
    FUNCTION_SET_IS_FINITE,
    FUNCTION_SET_IS_INF,
    FUNCTION_SET_IS_NAN,
    FUNCTION_SET_LCM,
    FUNCTION_SET_LN,
    FUNCTION_SET_LOG,
    FUNCTION_SET_LOG_2,
    FUNCTION_SET_PI,
    FUNCTION_SET_POWER,
    FUNCTION_SET_RADIANS,
    FUNCTION_SET_ROUND,
    FUNCTION_SET_SIGN,
    FUNCTION_SET_SIN,
    FUNCTION_SET_SINH,
    FUNCTION_SET_SQRT,
    FUNCTION_SET_TAN,
    FUNCTION_SET_TANH,
    FUNCTION_SET_TRUNC,
};
use random::FUNCTION_SET_RANDOM;
use similarity::FUNCTION_SET_L2_DISTANCE;
use string::{
    FUNCTION_SET_ASCII,
    FUNCTION_SET_BIT_LENGTH,
    FUNCTION_SET_BTRIM,
    FUNCTION_SET_BYTE_LENGTH,
    FUNCTION_SET_CONCAT,
    FUNCTION_SET_CONTAINS,
    FUNCTION_SET_ENDS_WITH,
    FUNCTION_SET_INITCAP,
    FUNCTION_SET_LEFT,
    FUNCTION_SET_LEFT_PAD,
    FUNCTION_SET_LENGTH,
    FUNCTION_SET_LIKE,
    FUNCTION_SET_LOWER,
    FUNCTION_SET_LTRIM,
    FUNCTION_SET_MD5,
    FUNCTION_SET_REGEXP_COUNT,
    FUNCTION_SET_REGEXP_INSTR,
    FUNCTION_SET_REGEXP_LIKE,
    FUNCTION_SET_REGEXP_REPLACE,
    FUNCTION_SET_REPEAT,
    FUNCTION_SET_REPLACE,
    FUNCTION_SET_REVERSE,
    FUNCTION_SET_RIGHT,
    FUNCTION_SET_RIGHT_PAD,
    FUNCTION_SET_RTRIM,
    FUNCTION_SET_SPLIT_PART,
    FUNCTION_SET_STARTS_WITH,
    FUNCTION_SET_STRPOS,
    FUNCTION_SET_SUBSTRING,
    FUNCTION_SET_TRANSLATE,
    FUNCTION_SET_UPPER,
};
use struct_funcs::{FUNCTION_SET_STRUCT_EXTRACT, FUNCTION_SET_STRUCT_PACK};

use crate::functions::function_set::ScalarFunctionSet;

pub const BUILTIN_SCALAR_FUNCTION_SETS: &[ScalarFunctionSet] = &[
    // Arith
    FUNCTION_SET_ADD,
    FUNCTION_SET_SUB,
    FUNCTION_SET_DIV,
    FUNCTION_SET_MUL,
    FUNCTION_SET_REM,
    FUNCTION_SET_LCM,
    // Bit operations
    FUNCTION_SET_XOR,
    FUNCTION_SET_SHL,
    FUNCTION_SET_SHR,
    // Boolean
    FUNCTION_SET_AND,
    FUNCTION_SET_OR,
    // Comparison
    FUNCTION_SET_EQ,
    FUNCTION_SET_NEQ,
    FUNCTION_SET_LT,
    FUNCTION_SET_LT_EQ,
    FUNCTION_SET_GT,
    FUNCTION_SET_GT_EQ,
    FUNCTION_SET_IS_DISTINCT_FROM,
    FUNCTION_SET_IS_NOT_DISTINCT_FROM,
    // Numeric
    FUNCTION_SET_CEIL,
    FUNCTION_SET_FLOOR,
    FUNCTION_SET_TRUNC,
    FUNCTION_SET_ROUND,
    FUNCTION_SET_SIGN,
    FUNCTION_SET_ABS,
    FUNCTION_SET_ACOS,
    FUNCTION_SET_ACOSH,
    FUNCTION_SET_ASIN,
    FUNCTION_SET_ASINH,
    FUNCTION_SET_ATAN,
    FUNCTION_SET_ATAN2,
    FUNCTION_SET_ATANH,
    FUNCTION_SET_CBRT,
    FUNCTION_SET_COS,
    FUNCTION_SET_COSH,
    FUNCTION_SET_COT,
    FUNCTION_SET_EXP,
    FUNCTION_SET_FACTORIAL,
    FUNCTION_SET_LN,
    FUNCTION_SET_LOG,
    FUNCTION_SET_LOG_2,
    FUNCTION_SET_PI,
    FUNCTION_SET_POWER,
    FUNCTION_SET_SIN,
    FUNCTION_SET_SINH,
    FUNCTION_SET_SQRT,
    FUNCTION_SET_TAN,
    FUNCTION_SET_TANH,
    FUNCTION_SET_DEGREES,
    FUNCTION_SET_RADIANS,
    FUNCTION_SET_IS_NAN,
    FUNCTION_SET_IS_FINITE,
    FUNCTION_SET_IS_INF,
    FUNCTION_SET_GCD,
    // String
    FUNCTION_SET_LOWER,
    FUNCTION_SET_UPPER,
    FUNCTION_SET_INITCAP,
    FUNCTION_SET_REPEAT,
    FUNCTION_SET_SUBSTRING,
    FUNCTION_SET_STARTS_WITH,
    FUNCTION_SET_ENDS_WITH,
    FUNCTION_SET_CONTAINS,
    FUNCTION_SET_LENGTH,
    FUNCTION_SET_BYTE_LENGTH,
    FUNCTION_SET_BIT_LENGTH,
    FUNCTION_SET_CONCAT,
    FUNCTION_SET_REGEXP_LIKE,
    FUNCTION_SET_REGEXP_REPLACE,
    FUNCTION_SET_REGEXP_COUNT,
    FUNCTION_SET_REGEXP_INSTR,
    FUNCTION_SET_ASCII,
    FUNCTION_SET_LEFT_PAD,
    FUNCTION_SET_RIGHT_PAD,
    FUNCTION_SET_LTRIM,
    FUNCTION_SET_RTRIM,
    FUNCTION_SET_BTRIM,
    FUNCTION_SET_LIKE,
    FUNCTION_SET_LEFT,
    FUNCTION_SET_RIGHT,
    FUNCTION_SET_SPLIT_PART,
    FUNCTION_SET_STRPOS,
    FUNCTION_SET_REVERSE,
    FUNCTION_SET_REPLACE,
    FUNCTION_SET_TRANSLATE,
    FUNCTION_SET_MD5,
    // Struct
    FUNCTION_SET_STRUCT_PACK,
    FUNCTION_SET_STRUCT_EXTRACT,
    // Unary
    FUNCTION_SET_NEGATE,
    FUNCTION_SET_NOT,
    // Random
    FUNCTION_SET_RANDOM,
    // List
    FUNCTION_SET_LIST_VALUE,
    FUNCTION_SET_LIST_EXTRACT,
    // Date/time
    FUNCTION_SET_DATE_PART,
    FUNCTION_SET_DATE_TRUNC,
    FUNCTION_SET_EPOCH,
    FUNCTION_SET_EPOCH_MS,
    // Is
    FUNCTION_SET_IS_NULL,
    FUNCTION_SET_IS_NOT_NULL,
    FUNCTION_SET_IS_TRUE,
    FUNCTION_SET_IS_NOT_TRUE,
    FUNCTION_SET_IS_FALSE,
    FUNCTION_SET_IS_NOT_FALSE,
    // Distance
    FUNCTION_SET_L2_DISTANCE,
    // Debug
    FUNCTION_SET_DEBUG_ERROR_ON_EXECUTE,
];
